<!DOCTYPE html>
<html>
<head>
<title>Jupyter Client</title>
<script type="application/javascript" src="/jupyter"></script>
<script type="application/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script>
<style type="text/css">
  * {
      font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  }
</style>
<script type="application/javascript">
  var kernel;
  document.addEventListener("DOMContentLoaded", function(event) {
      // TODO: May not be available everywhere
      var p = new URLSearchParams(window.location.search);
      var kernel = new EmacsJupyter({username: p.get('username'),
                                     clientId: p.get('clientId')},
                                    p.get('port'));
      var commManager = new CommManager(kernel);
      var widgetManager = new WidgetManager(kernel, document.getElementById("widget"));
      commManager.register_target(widgetManager.comm_target_name, function(comm, msg) {
          widgetManager.handle_comm_open(comm, msg);
      });
      kernel.widgetManager = widgetManager;
      kernel.commManager = commManager;
      window.kernel = kernel;
  });
</script>
</head>
<body>
</body>
</html>
